home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / xcmd / sprtxtrn.sea / Support Tools eXternals 1.2.5 / card_15375.txt < prev    next >
Text File  |  1990-11-13  |  3KB  |  113 lines

  1. -- card: 15375 from stack: in.5
  2. -- bmap block id: 17388
  3. -- flags: 0000
  4. -- background id: 3858
  5. -- name: RedrawDesktop
  6. ----- HyperTalk script -----
  7. on HideObjects
  8.   hide cd btn "Try It!"
  9. end HideObjects
  10.  
  11. on ShowObjects
  12.   show cd btn "Try It!"
  13. end ShowObjects
  14.  
  15.  
  16. -- part 1 (button)
  17. -- low flags: 00
  18. -- high flags: A002
  19. -- rect: left=74 top=190 right=224 bottom=176
  20. -- title width / last selected line: 0
  21. -- icon id / first selected line: 0 / 0
  22. -- text alignment: 1
  23. -- font id: 0
  24. -- text size: 12
  25. -- style flags: 8192
  26. -- line height: 16
  27. -- part name: Try It!
  28. ----- HyperTalk script -----
  29. on mouseUp
  30.   RedrawDesktop
  31. end mouseUp
  32.  
  33.  
  34.  
  35. -- part contents for background part 38
  36. ----- text -----
  37. 38/50
  38.  
  39. -- part contents for background part 42
  40. ----- text -----
  41. { UpdateDesk()}
  42. { XCMD force a redraw of the desktop and all windows }
  43. {}
  44. {   brought to you by:      Anup Murarka             Eric Carlson         }
  45. {                       ALINK:  SKEPTIC           ALINK:  cyNic   }
  46. {                                   CIS:  76004,3356         }
  47. {}
  48. {               We are part of the Support Tools Development Group,     }
  49. {               Apple Computer, Inc.      }
  50. {}
  51. {               please DO NOT contack Mac DTS for support of this code!    }
  52. {}
  53. {               please DO contact the authors for support of this code!     }
  54. {}
  55. {               Send comments, bug reports, requests to any of the above   }
  56. {               E-mail addresses or to:}
  57. {}
  58. {                           (one of us)                  }
  59. {                           Apple Computer, Inc.          }
  60. {                           900 E. Hamilton, Ave.          }
  61. {                           Campbell, CA   95008      }
  62. {                           M/S 72-L                     }
  63. {}
  64. {   Copyright:   ┬⌐ 1990 by Apple Computer, Inc., all rights reserved.     }
  65. {}
  66. { written by Eric Carlson                                        }
  67. { AppleLink:  cyNic                                              }
  68. { modification history                                                                                        }
  69. {          Date                  Initials                                    Comments                                   }
  70. {          ----              ------          ---------------------------------------------------- }
  71. {       4/18/90           ec            first written                                                                   }
  72. {}
  73.  
  74. unit DiskIsLocked;
  75.  
  76. interface
  77.  
  78.  uses
  79.   HyperXCmd, XCmdIncludes, MiscUtils;
  80.  
  81.  procedure MAIN (paramPtr: XCmdPtr);
  82.  
  83. implementation
  84.  
  85.  procedure UpdateDesk (paramPtr: XCmdPtr);
  86.   const
  87.    WindowListAddr = $9D6;
  88.   var
  89.    windowListPtr: ^WindowPeek;
  90.    first: WindowPeek;
  91.  begin
  92.   if askedForHelp(paramPtr, 'UpdateDesk()', 'v1.0, ┬⌐1990 Apple Computer, Inc.  by Eric Carlson') then
  93.    exit(UpdateDesk);
  94.  
  95.   windowListPtr := Pointer(WindowListAddr);
  96.   first := WindowListPtr^;
  97.   PaintBehind(first, GetGreyRgn);
  98.  end;
  99.  
  100.  procedure MAIN (paramPtr: XCmdPtr);
  101.  begin
  102.   UpdateDesk(paramPtr);
  103.  end;
  104.  
  105. end.{ unit UpdateDesk }
  106.  
  107. -- part contents for background part 20
  108. ----- text -----
  109.  This XCMD will force a redraw of all windows and the desktop, getting rid of all traces of the PlotPICT XCMD gone wild (or anything that draws outside of the area that it should).
  110.  
  111. Calling syntax: RedrawDesktop
  112.  
  113.